package de.codi.xtest;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import de.codi.exception.CodiException;
import de.codi.wrapper.Main;
import de.unima.alcomox.exceptions.AlcomoException;
import de.unima.alcomox.mapping.Characteristic;
import de.unima.alcomox.mapping.Mapping;


/**
 * 
 * Shows how to use the SEALS TDRS (test data respository service) Can be used
 * for running experiments on full sets of alignments.
 * 
 */
public class LocalTest
{

    public static void main(String[] args) throws CodiException, AlcomoException, IOException, URISyntaxException
    {
        Characteristic cAfter = new Characteristic();

        String dir = "file:/C:/Users/jan/Documents/workspace/codi2/";
        // String dir = "file:/C:/Users/Jakob/eclipse_workspace/codireloaded/";

        Mapping reference = new Mapping(dir + "res/conf/ref/cmt-conference.rdf");

        Main matcher = new Main();

        URI source = new URI(dir + "res/conf/ont/cmt.owl");
        URI target = new URI(dir + "res/conf/ont/Conference.owl");

        URI alignment = matcher.align(source, target);
        // compute precision and recall
        Characteristic after = new Characteristic(new Mapping(alignment.getPath()), reference);
        cAfter.join(after);
        System.out.println("\nAfter debugging: \n" + after);
    }
}
